<!DOCTYPE html>
<html>
<head>
    <title>内容管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__ADMIN__/zTreeStyle/zTreeStyle.css">
    <style type="text/css">
        .leftbar{
            width: 200px;
            position: absolute;
            left:0;
            top:0;
            bottom: 0;
            border-right: 1px solid #ddd;
            padding-top: 10px;
        }
        .rightbar{
            position: absolute;
            left:201px;
            top:0;
            bottom: 0;
            right: 0;
        }
        .maincontent{
            width: 100%;
            height: 100%;
            border:none;
        }
        .ztree li span{
            font-size: 14px;
        }
        .ztree li{
            line-height: 28px;
        }
        .ztree li a.curSelectedNode{
            height: 26px;
        }
    </style>
</head>
<body>
<div class="leftbar">
    <div class="zTree">
        <ul id="treeDemo" class="ztree"></ul>
    </div>
</div>
<div class="rightbar">
    <iframe class="maincontent" name="mainiframe" src="./productlist.html"></iframe>
</div>
</body>
<!-- jQuery 2.2.3 -->
<script src="__ADMIN__/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="__ADMIN__/zTreeStyle/jquery.ztree.core.js"></script>
<SCRIPT type="text/javascript">
    var setting = {
        view: {
            showIcon: false,
        },
        data: {
            simpleData: {
                enable: true
            }
        }
    };
    var zNodes;
    $.post("ztreeAjax",function (data) {
        if(data.data==""){
            /*没有权限*/
            parent.location.href="{:url('index/index')}";
        }else{
            zNodes=data;
            $.fn.zTree.init($("#treeDemo"), setting, zNodes);
        }

    })

</SCRIPT>

</html>